package _991GuanChaZhe.sub;

import _991GuanChaZhe.Observer;
import _991GuanChaZhe.Subject;

/**
 * @OctalObserver: 观察者抽象类 子类
 * @author: ZBoHang
 * @time: 2021/9/17 15:34
 */
public class OctalObserver extends Observer {
    public OctalObserver(Subject subject) {
        this.subject = subject;
        this.subject.attach(this);
    }

    @Override
    public void update() {
        System.out.println("八进制 --> " + Integer.toOctalString(subject.getState()));
    }
}
